using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using SCS.Common.Models;
namespace SCS.DAL.Mapping
{
    public class GradeTypeMap : EntityTypeConfiguration<GradeType>
    {
        public GradeTypeMap()
        {
            // Primary Key
            this.HasKey(t => t.gradetypeID);

            // Properties
            this.Property(t => t.gradeTypeName)
                .IsRequired()
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("GradeTypes");
            this.Property(t => t.gradetypeID).HasColumnName("gradetypeID");
            this.Property(t => t.gradeTypeName).HasColumnName("gradeTypeName");
        }
    }
}
